<main>
    <?php
    if (isset($_SESSION['subjectPanel'])) {
        $subject = $_SESSION['subjectPanel'];
        echo "<center><h1>$subject</h1></center>";
        addChapter("1");
        addChapter("2");
        addChapter("3");       
    } else {
        header("location: teacher.php");
    }


    function addChapter($name)
    {
        echo '<form action="/teacher/teacher.php" method="POST"> 
        <input type="submit" value="' . $name . '" name="chapterPanel"></form>';
    }
    ?>


</main>